﻿using System;
using System.IO;
using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace Infrastructure.Tests.Utils
{
    [TestClass]
    public class TestBase
    {
        public TestContext TestContext { get; set; }

        protected string TestDirectory
        {
            get { return Path.Combine(TestContext.DeploymentDirectory, TestContext.TestName, GetType().Name); }
        }

        [TestInitialize]
        public virtual void InitTest()
        {
            if (!Directory.Exists(TestDirectory)) Directory.CreateDirectory(TestDirectory);
        }
    }
}
